package com.zhangliang.tomcat;

import org.apache.catalina.startup.Tomcat;

import javax.servlet.ServletException;

public class SpringApplication {

    public static void run() throws Exception {
        Tomcat tomcat = new Tomcat();

        tomcat.setPort(8080);
        tomcat.addWebapp("/", "/Users/zhangliang/tools/");
        tomcat.start();
        tomcat.getServer().await();

    }
}
